package com.zj.system.exception;

import com.seventh.common.pojo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @program: clms-seventh
 * @description: 全局异常类
 * @author: 张静
 * @create: 2021-07-22 19:11
 **/
//@RestControllerAdvice //处理全局异常的注解
@RestControllerAdvice  //控制层异常处理类
public class GlobalException {
    @ExceptionHandler(value = Exception.class)
    public R exceptionHandler(Exception e){
        e.printStackTrace();//开发看的
        return R.error();
    }
}
